package com.zhuoli.service.springboot.mybatis.transaction.service.impl;

import com.zhuoli.service.springboot.mybatis.transaction.common.request.CreateUserRequest;
import com.zhuoli.service.springboot.mybatis.transaction.repository.service.UserRepository;
import com.zhuoli.service.springboot.mybatis.transaction.service.UserControllerService;
import lombok.AllArgsConstructor;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: zhuoli
 * @Date: 2018/8/12 12:30
 * @Description:
 */
@Service
@AllArgsConstructor
public class UserControllerServiceImpl implements UserControllerService {
    private UserRepository userRepository;

    @Override
    public void createUser(CreateUserRequest createUserRequest) {
        userRepository.createUser(createUserRequest.getName(), createUserRequest.getDescription());
    }

    @Override
    public void createUserWithAnnotation(CreateUserRequest createUserRequest) {
        userRepository.createUserWithAnnotation(createUserRequest.getName(), createUserRequest.getDescription());
    }
}